<div class="container">
<button id="spider_set" class="btn btn-default disabled start" data-toggle="modal" data-target="#namemodal">
Spider name设置
</button>
<button id="starturl_set" class="btn btn-default disabled" data-toggle="modal" data-target="#myModal">
起始URL设置
</button>
<button class="btn btn-default disabled">
中间URL设置
</button>
<button class="btn btn-default disabled">
详情URL设置
</button>
<button class="btn btn-default disabled">
抽取字段设置
</button>
</div>

<div class="container">
<h3 class="pull-left">spider list</h3>
<table class="table table-condensed table-hover table-bordered text-center">
    <thead>
        <tr style="background-color:#428bca">
        <td>id</td>
        <td>name</td>
        <td>domain</td>
        <td>createdate</td>
        <td>action</td>
        </tr>
    </thead>
    <?php foreach($data as $key=>$value){?>
    <tr>
    <td><?php echo $key;?></td>
    <td><?php echo $value->name;?></td>
    <td><?php echo $value->domain;?></td>
    <td style="width:20%"><?php echo $value->createdate;?></td>
    <td style="width:20%">
            <div class="btn-group">
  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span>
  </button>
        <ul class="dropdown-menu" role="menu">
        <li><a href="#">Update Spider Setting</a></li>
        <li><a href='<?php echo site_url("/spidercreate/delete/$value->id");?>'>Delete Spider</a></li>
  </ul>
</div>
        </td>
    </tr>
    <?php }?>
</table> 
<div id="example" class="container pull-left"></div>
</div>

<div class="modal fade" id="namemodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header">
        <form id="domainform" action="domainset" method="POST">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">spider domain</h4>
      </div>
      <div id="seturl" class="modal-body">
            <input name="name" type="text" class="form-control" placeholder="xx网站" />
            <input name="domain" type="text" class="form-control" placeholder="baidu.com" />
            <div class="error"></div>
      </div>
      <div class="modal-footer">
        <button id="cancel" type="button" class="btn btn-default" data-dismiss="modal" >Close</button>
        <button id="domainsubmit" type="button" class="btn btn-primary">Save changes</button>
        </form>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <form id="starturlform" action="starturl" method="POST">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div id="seturl" class="modal-body">
            <input name="starturl1" type="text" value="http://" class="form-control" onblur="set_url()">
      </div>
      <div class="modal-footer">
        <button id="cancel" type="button" class="btn btn-default" data-dismiss="modal" >Close</button>
        <button id="starturlsubmit" type="button" class="btn btn-primary">Save changes</button>
        </form>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script type="text/javascript" src="/static/js/jquery.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.js"></script>
<script type="text/javascript" src="/static/js/jquery.form.js"></script>
<script type="text/javascript" src="/static/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/static/js/bootstrap-paginator.js"></script>
<script type="text/javascript" src="/static/js/create.js"></script>
<script type='text/javascript'>
        var options = {
                        currentPage: 1,
                        totalPages: 10,
                        numberOfPages:5
                      }

        $('#example').bootstrapPaginator(options);

</script>
</body>
</html>
